package com.bianguo.android.apushdemo.model.impl;

import com.bianguo.android.apushdemo.entity.MovieEntity;
import com.bianguo.android.apushdemo.model.BaseModel;

import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;


/**
 * Created by Administrator on 2017/4/21.
 */

public class MovieModelImpl extends BaseModel {

    public void showMovie(Subscriber<MovieEntity> subscriber) {
        apiService.getTopMovie()
                .subscribeOn(Schedulers.io())
                .unsubscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(subscriber);
    }
}
